package com.ss.android.article.base.ui;

import android.os.Message;

import com.ss.android.article.base.feature.app.a.ArticleConstants;
import com.ss.android.common.AbsApiThread;
import com.ss.android.common.util.NetworkUtils;
import org.json.JSONArray;
import org.json.JSONObject;

final class aw implements Runnable {
    private final at a;

    aw(at arg1) {
        this.a = arg1;

    }

    public final void run() {
        int v0 = -1;
        try {
            String v0_2 = NetworkUtils.doGet(v0, ArticleConstants.buildUrl(this.a.m.url));
            if(android.support.design.a.isTextEmpty(v0_2)) {
                return;
            }

            JSONObject v1 = new JSONObject(v0_2);
            if(!AbsApiThread.isApiSuccess(v1)) {
                return;
            }

            JSONArray v0_3 = v1.optJSONArray("data");
            if(v0_3 == null) {
                return;
            }

            Message v1_1 = this.a.c.obtainMessage(10);
            v1_1.obj = v0_3;
            this.a.c.sendMessage(v1_1);
        }
        catch(Throwable v0_1) {
            v0_1.printStackTrace();
        }
    }
}

